package org.thanos.demo.core.enums;

public enum AuthorizedGrantType {

    AUTHORIZATION_CODE("authorization_code"),
    CLIENT_CREDENTIALS("client_credentials"),
    REFRESH_TOKEN("refresh_token"),
    PASSWORD("password"),
    IMPLICIT("implicit");

    AuthorizedGrantType(String code) {
        this.code = code;
    }

    private String code;

    public String getCode() {
        return code;
    }

    public static String[] allAuthorizedGrantTypes() {
        String[] arr = new String[values().length];
        for (int i = 0; i < values().length; i++) {
            arr[i] = values()[i].getCode();
        }
        return arr;
    }
}
